
/**
 * AppleIIGo
 * Auxiliary Slot Device class
 * (C) 2007-2008 by Marc S. Ressl (mressl@umich.edu)
 * Released under the GPL
 */

#include <string.h>

#include "AuxSlotDevice.h"
#include "InternalAuxMemory.h"
#include "RamWorksBasic.h"
#include "RamWorksIII.h"

AuxSlotDevice * AuxSlotDevice::getInstance(
	char * auxSlotDeviceType, Motherboard * motherboard) {
	if (!strcmp(auxSlotDeviceType, "InternalAuxMemory"))
		return new InternalAuxMemory(motherboard);
	else if (!strcmp(auxSlotDeviceType, "RamWorksBasic"))
		return new RamWorksBasic(motherboard);
	else if (!strcmp(auxSlotDeviceType, "RamWorksIII"))
		return new RamWorksIII(motherboard);
	else
		return new AuxSlotDevice(motherboard);
}

AuxSlotDevice::AuxSlotDevice(Motherboard * motherboard) :
Device(motherboard, "AuxSlotDevice") {
}

void AuxSlotDevice::onDevicesConnected() {
	timingGenerator = motherboard->getTimingGenerator();
}

UINT8 AuxSlotDevice::readIo(UINT16 address) {
	return timingGenerator->readFloatingBus();
}

void AuxSlotDevice::writeIo(UINT16 address, UINT8 value) {
} 
